<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <p style="font-size: 30px">作业1</p>
    <input type="text" id="input3" value="" />
    <input type="button" class="btn1" value="按钮 3" />

    <p style="font-size: 30px">作业2</p>
    <div class="box4"></div>
    <input type="text" id="input4" />
    <input type="button" id="btn4" value="按钮 4" />

    <p style="font-size: 30px">作业3</p>
    <div class="box5"></div>
    <input type="text" id="btn5" value="按钮 5" />

    <p style="font-size: 30px">作业4</p>
    <div class="box6"></div>
    <input type="text" id="input6" value="" />
    <div class="box6-2"></div>
    <input type="text" id="input6-2" value="" />
    <input type="text" id="btn6" value="按钮6" />

    <script>
              var ipt3=document.querySelector('#input3')
              var btn3=document.querySelector('.btn1')
              btn3.onclick=function(){
                  ipt3.value=btn3.value
              }
              var box4=document.querySelector('.box4')
              var ipt4=document.querySelector('#input4')
              var btn4=document.querySelector('#btn4')

              btn4.onclick=function(){
                  box4.innerHTML=ipt4.value
              }

              var box5=document.querySelector('.box5')
              var btn5=document.querySelector('#btn5')

              btn5.onblur=function(){
                  box5.innerHTML=btn5.value
              }

              var box6=document.querySelector('.box6')
              var ipt6=document.querySelector('#input6')
              var box6_2=document.querySelector('.box6-2')
              var ipt6_2=document.querySelector('#input6-2')
              var btn6=document.querySelector('#btn6')

              btn6.onclick=function(){
                  box6.innerHTML=ipt6.value
                  box6_2.innerHTML=ipt6_2.value
              }

    </script>
  </body>
</html>
